home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / compak7 / dacpack7.exe / dlgroup.asp < prev    next >
Encoding:
Text File  |  1998-10-12  |  2.5 KB  |  110 lines

  1. <%@ Language=VBScript %>
  2. <HTML>
  3. <HEAD>
  4. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  5. <title>DameWare Components ASP Test</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <%
  11.  
  12. ' ************** DLGroup *****************
  13. Set DLGroup = Server.CreateObject("DameWare.DLGroupCtl.1")
  14. TestMachine = "\\mymachine"
  15. TestUser = "Administrator"
  16. TestGroup = "Administrators"
  17.  
  18. %>
  19.  
  20. <center>
  21. <br>
  22. <hr WIDTH="80%" COLOR="INDIGO">
  23. <font SIZE="6" FACE="Times New Roman" COLOR="INDIGO">DLGroup ASP Test</font>
  24. <hr WIDTH="80%" COLOR="INDIGO">
  25. </center>
  26.  
  27. <TABLE Align=Center BORDER=0 WIDTH=600 BGColor=Gray Text=Indigo>
  28. <TR> 
  29. <TD><B>Local Machine Name</B></TD>
  30. <TD><Input Type=text Disabled Name="Machine" SIZE=50 Value="<%= DLGroup.GetMachineName %>"></TD>
  31. </TR>
  32. <TR> 
  33. <TD><B>ASP Running under User ID</B></TD>
  34. <TD><Input Type=text Disabled Name="USERID" SIZE=50 Value="<%= DLGroup.GetCurrentUserID %>"></TD>
  35. </TR>
  36. <TD><B>Testing for Machine Name</B></TD>
  37. <TD><Input Type=text Disabled Name="TMachine" SIZE=50 Value="<%= TestMachine %>"></TD>
  38. </TR>
  39. <TR> 
  40. <TD><B>Testing for User ID</B></TD>
  41. <TD><Input Type=text Disabled Name="TUSERID" SIZE=50 Value="<%= TestUser %>"></TD>
  42. </TR>
  43. <TR> 
  44. <TD><B>Testing for Group</B></TD>
  45. <TD><Input Type=text Disabled Name="TGROUP" SIZE=50 Value="<%= TestGroup %>"></TD>
  46. </TR>
  47. </table>
  48.  
  49. <BR>
  50. <center>
  51. <hr WIDTH="80%" COLOR="INDIGO">
  52.  
  53. <%
  54.  
  55. DLGroup.Machine = TestMachine
  56. DLGroup.UserID = TestUser
  57. DLGroup.Group = TestGroup
  58. Response.Write "<STRONG>ISMEMBER test says: </STRONG>"
  59. Response.Write "[" & CStr(DLGroup.IsMember) & "]"
  60.  
  61. If DLGroup.IsMember = False Then
  62.     Response.Write DLGroup.UserID & " is NOT a member of group " & DLGroup.Group & " on " & DLGroup.Machine & "<BR><BR>"
  63. else
  64.     Response.Write DLGroup.UserID & " is a member of group " & DLGroup.Group & " on " & DLGroup.Machine & "<BR><BR>"
  65. end if
  66.  
  67. %>
  68.  
  69. </center>
  70.  
  71. <TABLE Align=Center BORDER=0 WIDTH=400 BGColor=Gray Text=Indigo>
  72. <TR> 
  73. <TD><Input Type=text Disabled SIZE=40 Value="GROUP NAME"></TD>
  74. <TD><Input Type=text Disabled SIZE=40 Value="GROUP COMMENT"></TD>
  75. </TR>
  76.  
  77. <%
  78.  
  79. DLGroup.Machine = TestMachine
  80. DLGroup.Group = TestGroup
  81. DLGroup.Userid = TestUser
  82. DLGroup.SetFirstUserGroup
  83. i = 0
  84. While DLGroup.UserGroupGetNext <> 0
  85.  
  86. %>
  87.  
  88. <TR> 
  89. <TD><Input Type=text Disabled SIZE=40 Value="<%= DLGroup.Group %>"></TD>
  90. <TD><Input Type=text Disabled SIZE=40 Value="<%= DLGroup.GroupComment %>"></TD>
  91. </TR>
  92.  
  93. <%
  94.  
  95.     i = i + 1
  96. Wend
  97.  
  98. %>
  99.  
  100. </table>
  101.  
  102. <%
  103.  
  104. Set DLGroup = Nothing
  105.  
  106. %>
  107.  
  108. </body>
  109. </html>
  110.